lib: Hoist unlinkat() cleanup API to fsutil, use in pull
authorColin Walters <walters@verbum.org>
Sat, 24 Jun 2017 13:30:02 +0000 (09:30 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 26 Jun 2017 17:17:32 +0000 (17:17 +0000)
commit4dee1984dccace10572192d2f63b7a6fc7d453ee
tree8e61deb12fb2107c0a41d7b45917acdb34b2a84d
parent1147267e4d849d99dbdc4b8635100b08dc089dae
lib: Hoist unlinkat() cleanup API to fsutil, use in pull

The pull code also could make use of this in both the metadata and content
paths. I changed it to own the tempfile malloc (just like `GLnxTmpFile`), since
there's no reason to have different lifetimes for the filename and the file, and
that way we only have one variable rather than two.

The content path turns out to be a special case though, where
at least for mirroring archives, we directly pass the file *path*
down into `_ostree_repo_commit_loose_final()`.

This is prep for `GLnxTmpFile` porting.

Closes: #957
Approved by: jlebon
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-pull.c
src/libotutil/ot-fs-utils.h